import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'

// 导入全局样式
import './assets/css/style.css'

Vue.config.productionTip = false

//导入axios
import http from './http'
Vue.prototype.$http = http;

Vue.mixin({
  methods: {
    getAuthHeader() {
      return {
        Authorization: `Bearer ${localStorage.token || ''}`
      }
    }
  },
  computed: {
    isAdd() {
      return this.id ? "编辑" : "添加";
    },
  },
})

// echarts图表
import './plugins/echarts'

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')